using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MXERP.Client;
using System.Globalization;
public class Program
{
    public static async Task Main(string[] args)
    {
        var builder = WebAssemblyHostBuilder.CreateDefault(args);

        builder.RootComponents.Add<App>("#app");
        builder.RootComponents.Add<HeadOutlet>("head::after");
        builder.Services.AddClientServices(builder.Configuration);
        var host = builder.Build();
        var layoutService = host.Services.GetRequiredService<LayoutService>();
        if (layoutService != null)
        {
            var culture = new CultureInfo(layoutService.LanguageCode);
            CultureInfo.DefaultThreadCurrentCulture = culture;
            CultureInfo.DefaultThreadCurrentUICulture = culture;
        }
        await host.RunAsync();
    }

}
